<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a="http://richfaces.org/a4j">

<!-- 
		Replace path to template, title, header and body
		with actual data.
	 -->
<ui:composition template="/WEB-INF/template.xhtml">
	<ui:define name="topnav">
		<ui:include src="/include/admin_nav.xhtml" />
	</ui:define>
	<ui:define name="sidebar">
		<ui:include src="/include/left_nav.xhtml" />
	</ui:define>
	<ui:define name="body">
		<div class="body-title">Edit PMS Station</div>
		<h:form id="editStation">
			<fieldset>
			<s:validateAll>

				<f:facet name="aroundInvalidField">
					<s:span styleClass="errors" />
				</f:facet>

				<div class="entry">
				<div class="label"><h:outputLabel for="stationName">BTS Station Name:</h:outputLabel></div>
				<div class="input"><s:decorate id="stationNameDecorate">
					<h:inputText id="stationName" value="#{vbtsstation.btsName}" required="true">
						<a:support event="onblur" reRender="stationNameErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="stationNameErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

				<div class="entry">
				<div class="label"><h:outputLabel for="stationLocation">Location of BTS Station:</h:outputLabel></div>
				<div class="input"><s:decorate id="stationLocationDecorate">
					<h:inputText id="stationLocation" value="#{vbtsstation.btsLocation}" required="false">
						<a:support event="onblur" reRender="stationLocationErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="stationLocationErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

				<div class="entry">
				<div class="label"><h:outputLabel for="stationStatus">BTS Status: </h:outputLabel></div>
				<div class="input"><s:decorate id="stationStatusDecorate">
					<h:selectBooleanCheckbox value="#{vbtsstation.btsStatus}" required="false">
						<a:support event="onblur" reRender="stationStatusErrors" />
					</h:selectBooleanCheckbox>
					<br />
					<a:outputPanel id="stationStatusErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>
				<div class="entry">
				<div class="label"><h:outputLabel for="stationCapacity">Capacity: </h:outputLabel></div>
				<div class="input"><s:decorate id="stationCapacityDecorate">
					<h:inputText value="#{vbtsstation.btsCapacity}" required="false">
						<a:support event="onblur" reRender="stationCapacityErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="stationCapacityErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>
				
				<div class="entry">
				<div class="label"><h:outputLabel for="stationUsed">Capacity: </h:outputLabel></div>
				<div class="input"><s:decorate id="stationUsedDecorate">
					<h:inputText value="#{vbtsstation.btsUsed}" required="false">
						<a:support event="onblur" reRender="stationUsedErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="stationUsedErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>
			<div class="entry">
				<div class="label"><h:outputLabel for="teamID">Team: </h:outputLabel></div>
				<div class="input"><s:decorate id="teamIDDecorate">
					<h:selectOneMenu value="#{vbtsstation.btsBelongTo}" 
					   converter="#{btsStationAction.converter}" required="false">
					   <f:selectItems value="#{btsStationAction.teamList}"/>
					   <!-- 
					 <f:selectItem  itemValue="1" itemLabel="Team 1"/>
					 <f:selectItem  itemValue="2" itemLabel="Team 2"/>
					 <f:selectItem  itemValue="3" itemLabel="Team 3"/>
					  
					  <s:selectItems value="#{btsStationAction.teams}" var="t" label="#{t.teamName}" binding="#{vbtsstation.btsBelongTo}"/>
					  -->
					  <a:support event="onblur" reRender="teamIDErrors" />
					</h:selectOneMenu>
						
					
					<br />
					<a:outputPanel id="teamIDErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

			</s:validateAll>

			<div class="entry errors"><h:messages id="messages"
				globalOnly="true" /></div>

			<div class="entry">
			<div class="label">&#160;</div>
			<div class="input"><h:commandButton id="addNew"
				value="Add New" action="#{btsStationAction.createItem}" />&#160; 
				<h:commandButton action="cancel" value="Cancel" /></div>
			</div>

			</fieldset>
		</h:form>
	</ui:define>
</ui:composition>

</html>